﻿Imports EDMDesigner.UIBusiness

Public Module Writer
    Public Function Write(ByVal edmView As EDMView) As XElement
        Return <DesignerViews>
                   <%= From view In edmView.DesignerViews _
                       Select Write(view) %>
               </DesignerViews>
    End Function

    Public Function Write(ByVal designerView As DesignerView) As XElement
        Return <DesignerView Name=<%= designerView.Name %> Zoom=<%= designerView.Zoom %>>
                   <%= From uiType In designerView _
                       Select <DesignerType Name=<%= uiType.UIType.Name %> Left=<%= uiType.Left %> Top=<%= uiType.Top %> IsExpanded=<%= uiType.IsExpanded %>/> %>
               </DesignerView>
    End Function
End Module
